home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / printing / std file saver / read me 2.0 next >
Encoding:
Text File  |  2000-09-28  |  2.6 KB  |  22 lines

  1.  
  2.  
  3.  
  4. What it is
  5. StdFileSaver 2.0 is a sample print driver. It's based upon the STD File Saver 1.1 sample that has been the only print driver sample available since 1991.
  6.  
  7. Why do I want it?
  8. If you've developed a printer and want to support Print Manager printing, you'll need to write a print driver. If the printer isn't a PostScript® printer, you'll need to write your own driver. Documentation for how to write drivers is pretty scarce. There's Learning to Drive, Inside Macintosh:Imaging with QuickDraw, Chapter 9, and not much else. STD File Saver 1.1 is available on the Developer CD, but there are a few problems with it, the major one being that it hasn't been updated since 1991, and the Universal Headers got introduced and it won't compile anymore. Also, STD File Saver 1.1 was written in Pascal (with some assembly for the jump tables) and version 2.0 is written in C (with some assembly for the jump tables).
  9.  
  10. Other things that I've updated
  11. UPPs are now used where appropriate. The driver is still designed to be compiled only for 68k, but setting up portions of the driver as PowerPC native or fat components should be easier. I've also added some extra debugging code that I found useful when testing with various applications in order to determine what the heck they were doing. PictDriver is a useful QA tool for testing applications.
  12.  
  13. Where do I go from here?
  14. Well, since StdFileSaver 2.0 just saves the graphics operations to a PICT, you'll probably want to replace those operations with code that puts dots on your printer. How you do this is up to you, and will depend on what kind of printer you're developing a driver for. If you're doing a driver for a raster printer, you'll want to change the code so it draws into a GWorld, and then copies the bitmap (or pixmap) data to the printer. If your printer has graphics primitives of another type (such as PCL or HPGL), you'll want to change the code so it outputs the commands to execute those primitives, and handles the rest either by drawing to a GWorld and copying the bits, or by translating them into simpler commands.
  15.  
  16. What's the future of StdFileSaver 2.0?
  17. I'm not certain what the next step will be, but ideas I've had are to refit StdFileSaver 2.0 to output PCL5, complete with the proper PJL commands to drive an HP LaserJet. Then again, maybe I'll modify the driver to work with some other more arcane piece of hardware. Drawing to a vt100 terminal might be cool, as would doing characters graphics on a tty33, complete with using ColorSync to do gray-level matching. The future holds strange and wondrous things.
  18.  
  19. Dave Polaschek
  20. Developer Technical Support
  21. Apple Computer, Inc.
  22. dpolasch@apple.com